package com.songcha.sakura.util

import android.content.Context
import android.media.MediaPlayer


class MediaPlayerUtil {
    companion object{
        var mMediaPlayer: MediaPlayer?=null
        @JvmStatic
        fun playMp3(context: Context,res:Int){
            mMediaPlayer= MediaPlayer.create(context,res)
            if(mMediaPlayer!!.isPlaying)
                mMediaPlayer!!.stop()
            mMediaPlayer!!.start()
        }
    }
}